/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.admin.service;

import org.springblade.modules.admin.entity.EstateElevatorUser;
import org.springblade.modules.admin.vo.EstateElevatorUserVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.admin.vo.EstateSelectUserVO;
import org.springblade.modules.admin.vo.user.SafeUserVo;

import java.util.List;

/**
 * 物业电梯管理人 服务类
 *
 * @author ysq
 * @since 2022-05-27
 */
public interface IEstateElevatorUserService extends BaseService<EstateElevatorUser> {

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param estateElevatorUser
	 * @return
	 */
	IPage<EstateElevatorUserVO> selectEstateElevatorUserPage(IPage<EstateElevatorUserVO> page, EstateElevatorUserVO estateElevatorUser);

	/**
	 * 电梯分配人员
	 * @param selectUserVO
	 * @return
	 */
	boolean distribution(EstateSelectUserVO selectUserVO);

	/**
	 * 删除电梯管理人
	 * @param elevatorIds
	 * @return
	 */
	boolean removeElevatorUser(List<Long> elevatorIds);

	/**
	 * 删除电梯管理人
	 * @param userIds
	 * @return
	 */
	boolean removeByUserIds(List<Long> userIds);

	/**
	 * 检查用户是否是电梯管理人
	 *
	 * @param deptIds
	 * @param userId
	 * @return
	 */
	SafeUserVo checkElevatorUser(Long userId,String deptIds);

	/**
	 * 获取物业电梯安全员
	 * @param elevatorId
	 * @return
	 */
	List<Long> getEstateElevatorSafeUser(Long elevatorId);

	/**
	 * 删除电梯管理员和安全员的关系
	 * @param userId
	 * @return
	 */
	boolean deleteElevatorUser(Long userId);

	/**
	 * 根据用户id和部门id删除关系
	 * @param userId 用戶id
	 * @param deptIds 部門ids
	 * @return 数据集
	 */
	boolean deleteElevatorUser(Long userId, String deptIds);
}
